<?php

namespace pmvc\log;

use DateTime;

class MultiAppender
	implements Appender {

	private $appenders;

	/**
	 * Creates the appender with the given underlying
	 * appenders.
	 * 
	 * @param array $appenders
	 */
	public function __construct(Array $appenders) {
		$this->appenders = $appenders;
	}
	/**
	 * {@inheritDoc}
	 */
	public function append($level, DateTime $time, $name, $message) {
	    foreach ($this->appenders as $appender) {
	    	$appender->append($level, $time, $name, $message);
	    }
	}

}

?>